package org.anno.chunkdb;

import java.io.IOException;

/**
 * Interface to support query plans.
 */
public interface QueryPlanSupport extends Iterable<Host<RowVisitor>> {

  /**
   * Returns Iterable of rows ordered by values in the given column.
   *
   * @param from inclusive start, null and {@code from.length == 0} include the lowest value
   * @param to   exclusive end. Value {@code null} means no bound. Note that "foo\0" is a suitable
   *             exclusive end when an inclusive end "foo" is desired.
   * @param asc  {@code true} means ascending, {@code false} descending order.
   */
  Iterable<Host<RowVisitor>> getOrderedRange(
      final int column, final byte[] from, final byte[] to, final boolean asc) throws IOException;
}
